﻿@model Orchard.Markdown.ViewModels.MarkdownPartViewModel
@inject Orchard.Tokens.Services.ITokenizer Tokenizer

@{
    string markdown = Model.Markdown;

    if (Model.TypePartSettings.RenderTokens)
    {
        var context = Tokenizer.CreateViewModel().Content(Model.MarkdownPart.ContentItem);
        markdown = Tokenizer.Tokenize(markdown, context);
    }
}

@markdown.Substring(0, Math.Min(markdown.Length, 200))
